﻿#ifndef U_QualityAlarmPage_H
#define U_QualityAlarmPage_H

#include "Window/mydialog.h"
#include "Window/Charts/u_quality_history_chart.h"


#define RED "min-width:20px;min-height:20px; max-width:20px;max-height:20px;border-radius:10px;border:1px solid black;background:red;"
//#define WHITE "min-width:20px;min-height:20px; max-width:20px;max-height:20px;border-radius:10px;border:1px solid black;background:rgba(100,100,140);"
#define GREEN "min-width:20px;min-height:20px; max-width:20px;max-height:20px;border-radius:10px;border:1px solid black;background:rgba(0,255,0);"

class QualityAlarmPage : public MyDialog
{
    Q_OBJECT
public:
    explicit QualityAlarmPage(QWidget *parent = nullptr);

signals:

public slots:

//    void OnBtnQueryClicked();
//    void OnTableSelectRow1();
//    void OnTableDoubleClicked1(int row, int column);
    void update();
    void updateTable();

private:

    void InitWidget();
//    void SetupConnections();
    void Initialize();
//    void UpdateTable1();

    //QList<QualityAlarm>  alarmList;
    //QList<Quality> qualityList;

    QTableWidget        *tableWidget1;
    //QualityHistoryChart *chart;

    QPushButton  *btnQuery;

    QComboBox    *editEquCode;
//    QComboBox    *editType;
    QDateEdit    *editStartDate;

    QDateTimeEdit *editStartTime;
    QDateTimeEdit *editEndTime;
    QList<State>   StatrList;
    QList<QLabel*> labList;
};

#endif // U_QualityAlarmPage_H
